
require('./bootstrap');

window.Vue = require('vue');


import Vue from 'vue';
import VueRouter from 'vue-router';
//element组件
import ElementUI from 'element-ui'; 
import 'element-ui/lib/theme-chalk/index.css';
//引入Font Awesome 字体图标矢量库
import 'font-awesome/css/font-awesome.min.css';

Vue.use(ElementUI);
Vue.use(VueRouter);

//加载时引入路由20210409
import routes from './router';

import App from './App.vue';


Vue.config.devtools = true;
Vue.config.performance = true;

//路由
const router = new VueRouter({
    mode: 'history',
    base: __dirname,
    linkActiveClass: 'active',
    routes: routes
});


//自动注册 Vue 组件。这将递归的扫描 Vue 组件目录,按照其 "文件名" 自动注册全局组件
//Vue.component('example-component', require('./components/ExampleComponent.vue').default);
Vue.component('crud-component', require('./components/CrudComponent.vue'));
Vue.component('v-table', require('./views/components/Table'));
Vue.component('v-page', require('./views/components/Pagination').default);



const app = new Vue({
    el: '#app',
    router,
    render:h => h(App)
});

 